<?php

namespace Maestros\Controller\Service;

use Zend\Mvc\Controller\Plugin\AbstractPlugin;

class GenericService extends AbstractPlugin {
    
    private $dbAdapter;
    
    public function getPersonaDao() {
        return \Maestros\Model\Dao\PersonaDAO::getInstance($this->dbAdapter);
    }

    public function setOuput($success, $data, $mensaje){
        $output = array(
            'success' => $success,
            'data' => $data,
            'total' => count($data),
            'mensaje' => $mensaje
        );
        return $output;
    }
}